package com.tspp.dao;

import com.tspp.dao.dto.ExamResult;
import java.util.List;

/**
 * Interface for examResult dao. Contains crud operation
 * @author Maks
 */
public interface ExamResultDao {
    /**
     * Inserts a new row in the EXAM_RESULT table.
     */
    public void insert(ExamResult dto) throws DaoException;

    /**
     * Updates a single row in the EXAM_RESULT table.
     */
    public void update(int exam, int entrant, ExamResult dto) throws DaoException;

    /**
     * Deletes a single row in the EXAM_RESULT table.
     */
    public void delete(int exam, int entrant) throws DaoException;

    /**
     * Returns all rows from the EXAM_RESULT table that match the criteria 'ID_EXAM = :idExam AND ID_ENTRANT = :idEntrant'.
     */
    public ExamResult findByPrimaryKey(int idExam, int idEntrant) throws DaoException;

    /**
     * Returns all rows from the EXAM_RESULT table that match the criteria ''.
     */
    public List<ExamResult> findAll() throws DaoException;

    /**
     * Returns all rows from the EXAM_RESULT table that match the criteria 'ID_EXAM = :idExam'.
     */
    public List<ExamResult> findByExam(int idExam) throws DaoException;

    /**
     * Returns all rows from the EXAM_RESULT table that match the criteria 'ID_ENTRANT = :idEntrant'.
     */
    public List<ExamResult> findByEntrant(int idEntrant) throws DaoException;

    /**
     * Returns all rows from the EXAM_RESULT table that match the criteria 'POINTS = :points'.
     */
    public List<ExamResult> findWherePointsEquals(int points) throws DaoException;
}
